home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 19 / CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso / CUCD / Utilities / BuzzWord / buzzword.c < prev    next >
C/C++ Source or Header  |  1997-09-26  |  6KB  |  137 lines

  1. /* ----------------------------------------------------- */
  2. /* Buzzword Generator                                    */
  3. /* Dave MacLeod <davmac@netcomuk.co.uk>                  */
  4. /*                                                       */
  5. /* This app loads arrays with industry standard bullshit */
  6. /* and then loops round generating meaningless babble    */
  7. /* (as championed by consultancies the world over) by    */
  8. /* choosing a word at random from each of the arrays.    */
  9. /*                                                       */
  10. /* I've used the source code from "Money" as a template, */
  11. /* along with bits chopped out of the examples that come */
  12. /* with GCC.                                             */
  13. /* ----------------------------------------------------- */
  14. /* v0.1     21/04/97    Creation                         */
  15. /* ----------------------------------------------------- */
  16. /* v0.2     27/04/97    Addition of "About box"          */
  17. /*                      Copy text to clipboard           */
  18. /* ----------------------------------------------------- */
  19. /* v0.3     03/06/97    Fix randomisation bug            */
  20. /* ----------------------------------------------------- */
  21. /* v0.4     05/06/97    Add new words suggested by Peter */
  22. /*                      Allwin.                          */
  23. /* ----------------------------------------------------- */
  24. /* v0.5     05/06/97    Add new words suggested by       */
  25. /*                      Clym_Escudero@idx.com            */
  26. /* ----------------------------------------------------- */
  27. /* v0.6     26/09/97    Ported to Amiga by               */
  28. /*                      newlook@ameritech.net            */
  29. /* ----------------------------------------------------- */
  30.  
  31. #include <exec/types.h>
  32. #include <stdio.h>
  33. #include <time.h>
  34. #include <stdlib.h>
  35. #include <string.h>
  36.  
  37. #define MaxE1        58
  38. #define MaxE2        63
  39. #define MaxE3        65
  40. #define MaxC1        19
  41. #define MaxC2        18
  42. #define MaxC3        22
  43.  
  44. /* ----------------------------------------------------- */
  45. /* Global Variables                                      */
  46. /* ----------------------------------------------------- */
  47.  
  48. char Word1[MaxE1][MaxC1] =
  49. {
  50.   "Exclusive","Total","Fundamental","Phased","Integrated","Object-based","Devolved","Distributed",
  51.   "Right-sized","Decentralized","Centralized","Ameliorated","Digitized","Networked","Focused",
  52.   "Synergized","Polarised","Advanced","Assimilated","Optional","Synchronised","Compatible",
  53.   "Function-based","Future-proofed","Managed","Organised","Up-sized","Down-sized","Mandatory",
  54.   "Customer-focused","Business-focused","Profit-focused","Standalone","Organic","Quality-focused",
  55.   "Secured","Extended","Cloned","Balanced","Reverse-Engineered","Syngergistic","Vision-oriented",
  56.   "Enterprise-wide","De-engineered","Cross-group","Re-engineered","Open-architected","Front-line",
  57.   "Optimized","Grass-roots","Horizontal","Multi-tiered","Team oriented","Face to face","Versatile",
  58.   "Progressive","Persevering"
  59. };
  60.  
  61. char Word2[MaxE2][MaxC2] =
  62. {
  63.   "client-server","didactic","radial","user-facing","eco-centric","uniform","composite","holistic",
  64.   "stable","coherent","discrete","heuristic","hybrid","modular","optimal","homogeneous","incremental",
  65.   "logistical","mobile","dynamic","executive","RAD/JAD","human-resource","empowering","vertical",
  66.   "cohesive","systematic","responsive","reciprocal","transitional","human-resource","3rd generation",
  67.   "4th generation","5th generation","scalable","fault-tolerant","WYSIWYG","local","national",
  68.   "global","regional","neural","24hr","value-added","multimedia","systematic","maximizing",
  69.   "clear-thinking","optimizing","motivating","well-modulated","fresh-thinking","keen","even-keeled",
  70.   "upward-trending","methodical","tangible","bottom-line","actuating","analyzing","encompassing",
  71.   "exuding","solution-oriented"
  72. };
  73.  
  74. char Word3[MaxE3][MaxC3] =
  75. {
  76.   "hub","paradigm","concept","contingency","flexibility","methodology","project","definition",
  77.   "projection","task-force","moderator","implementation","structure","ability","scenario",
  78.   "challenge","solution","installation","knowledgebase","inheritance","throughput","approach",
  79.   "alliance","implementation","data-warehouse","migration","interface","moratorium","parallelism",
  80.   "monitoring","policy","capability","middleware","hardware","software","GUI","LAN/WAN","intranet",
  81.   "toolset","product","support","help-desk","groupware","hit-squad","model","orchestration",
  82.   "emulation","collaboration","focus group","success","conglomeration","attitude","pricing Structure",
  83.   "workforce flexibility","synergy","system engine","alliance","utilization","GUI","open architecture",
  84.   "open system","initiative","knowledge user","superstructure","frame"
  85. };
  86.  
  87. /* ----------------------------------------------------- */
  88. /* RandN                                                 */
  89. /*   This function generates a random number between 0   */
  90. /*   and MaxNo                                           */
  91. /* Parms                                                 */
  92. /*   MaxNo - Maximum number to be returned               */
  93. /* Returns                                               */
  94. /*   A random integer                                    */
  95. /* ----------------------------------------------------- */
  96.  
  97. USHORT RandN(int MaxNo)
  98. {
  99.   srand(time(NULL));
  100.   return((USHORT)(((USHORT)rand() * (USHORT)MaxNo) / (USHORT)RAND_MAX));
  101. }
  102.  
  103. /* ----------------------------------------------------- */
  104. /* DisplayWord                                           */
  105. /*   This function wallops the buzzword out onto the     */
  106. /*   screen.                                             */
  107. /* Parms                                                 */
  108. /*   None                                                */
  109. /* Returns                                               */
  110. /*   Nowt                                                */
  111. /* ----------------------------------------------------- */
  112.  
  113. void DisplayWord(void)
  114. {
  115.   char tmp1[MaxC1];
  116.   char tmp2[MaxC2];
  117.   char tmp3[MaxC3];
  118.   char tmp[MaxC1+MaxC2+MaxC3+3];
  119.  
  120.   strcpy(tmp1,Word1[RandN(MaxE1)]);
  121.   strcpy(tmp2,Word2[RandN(MaxE2)]);
  122.   strcpy(tmp3,Word3[RandN(MaxE3)]);
  123.  
  124.   strcpy(tmp,tmp1);
  125.   strcat(tmp," ");
  126.   strcat(tmp,tmp2);
  127.   strcat(tmp," ");
  128.   strcat(tmp,tmp3);
  129.   printf("%s\n",tmp);
  130. }
  131.  
  132. int main(int argc, char **argv)
  133. {
  134.    DisplayWord();
  135.    return 0;
  136. }
  137.